package com.jzo2o.customer.controller.agency;


import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.jzo2o.common.expcetions.ForbiddenOperationException;
import com.jzo2o.customer.model.domain.AgencyCertificationRecording;
import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.request.CertificationAuditReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.ICertificationByAgencyService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController("certificationByAgencyController")
@RequestMapping("/agency/agency-certification-audit")
@Api(tags = "机构端 - 机构提交认证相关接口")
public class CertificationByAgencyController {

    @Resource
    private ICertificationByAgencyService iCertificationByAgencyService;

    /**
     * 机构提交认证
     * @param addReqDTO
     */
    @PostMapping
    public void audit(@RequestBody AgencyCertificationAuditAddReqDTO addReqDTO) {
        iCertificationByAgencyService.addCertificationAudit(addReqDTO);
    }

    @GetMapping("/rejectReason")
    public RejectReasonResDTO getRejectReason() {
        return iCertificationByAgencyService.getRejectReason();
    }


}
